package com.yeyks.app.function.task;


import com.yeyks.config.service.AppInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RefreshTask {

    @Autowired
    private AppInfoService appInfoService;

    @Scheduled(fixedDelay = 1000 * 60)
    public String refreshForcedVersion() {
        appInfoService.refreshForcedVersion();
        return "ok";
    }

}
